Skip to content

Stop syncing a drive to a node that refuses it as not enrolled - #1787

Closed
joepio wants to merge 1 commit into
developfrom
claude/unenrolled-drive-sync
Closed

joepio wants to merge 1 commit into
developfrom
claude/unenrolled-drive-sync

Conversation

@joepio

@joepio joepio commented Sep 25, 2026

Copy link
Copy Markdown
Member

Requested by Joep

Before: a personal drive without Cloud Server could still end up syncing to node1. The node refused every write ("Drive … is not enrolled for sync on this node"), the server card sat on "Connecting…" with changes pending, and unticking "Sync this workspace with this server" did nothing.

After: the server card says "Not hosted here" and explains that the server refuses this workspace, pointing at Cloud Server setup or at turning sync off. Turning sync off works in that state and keeps the workspace on this device. A Suspended Cloud Server enrollment no longer makes the app point a drive at a node that won't serve it.

The app treated any enrollment that wasn't Disabled or Pending as hosted, while the node serves only Pending, Active and Error (is_servable in atomic-saas). A Suspended row (or a manual grant that left one) made the app connect the drive to a node that then refused it. Separately, the sync checkbox was disabled whenever the server wasn't connected, and turning sync off first asked the server for its inventory, which a refusing node can never answer.

How: Store.isDriveRefusedByServer reads the not-enrolled refusal from the last drive sync or a parked outbox entry. makeDriveLocal skips the inventory check for such a drive, registers it local-only and drops its refused outbox entries (turning sync on later resyncs the whole drive). SyncRoute shows the refused state and keeps the checkbox usable. resolveHostedDriveOrigin counts only Active and Error enrollments. New store.refused-drive.test.ts; reconcile.test.ts covers Suspended.

@joepio joepio self-assigned this Sep 25, 2026
joepio added a commit that referenced this pull request Sep 25, 2026
# Conflicts:
#	browser/CHANGELOG.md
#	browser/data-browser/src/locales/de.po
#	browser/data-browser/src/locales/en.po
#	browser/data-browser/src/locales/es.po
#	browser/data-browser/src/locales/fr.po
joepio added a commit that referenced this pull request Sep 25, 2026
#1826, #1787, #1783, #1791, #1840, #1841) (#1844)

Combined batch, green on Mancave in run 4645 on 3346a6c (CI and Downstream).

Includes #1826, #1787, #1783, #1791, #1840 and #1841, plus settled
translation catalogs.

joepio commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

Landed on develop in ef161c3 via the combined batch #1844 (green on Mancave, run 4645). Closing.


Generated by Claude Code

@joepio joepio closed this Sep 25, 2026
joepio added a commit that referenced this pull request Sep 25, 2026
…, #1779, #1780, #1784, #1782) (#1852)

Combined batch, green on Mancave in run on 01d080f (CI and Downstream).

Includes #1772, #1777, #1779, #1780, #1784 and #1782, and restores six
catalog strings from #1820 and #1787 that earlier batches dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant